package com.atguigu.exam;

import java.util.ArrayList;
import java.util.Collections;

/**
 * @author xbd
 * @create 2021-05-28 11:57
 */
public class ReverTest {
    public static void main(String[] args) {
        ArrayList a = new ArrayList();
        for (int i = 0; i < 10; i++) {
            a.add(i);
        }
        Collections.reverse(a);
        System.out.println(a);


        ArrayList b = new ArrayList();
        b.add("转换");
        b.add("集合");
        b.add("字符");
        b.add("元素");
        Collections.reverse(b);
        System.out.println(b);
    }
}
